package com.example.erp.controller;


import com.alibaba.fastjson.JSONObject;
import com.example.erp.entity.dto.GoodsDto;
import com.example.erp.entity.dto.InoutBoundDto;
import com.example.erp.service.IGoodsService;
import com.example.erp.utils.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;
import java.util.List;

/**
 * <p>
 * 食品 前端控制器
 * </p>
 *
 * @author rws
 * @since 2025-01-08
 */
@RestController
@RequestMapping("/erp/goods")
@CrossOrigin
public class GoodsController {
    @Autowired
    private IGoodsService goodsService;
    @RequestMapping("/update-pic")
    public JSONObject updatePic(@RequestBody GoodsDto goodsDto) throws IOException {
        goodsService.updatePic(goodsDto);
        return JsonResult.successJson();
    }

}

